package com.gcloud.dto;

import java.text.MessageFormat;

import android.net.Uri;

public class GCloudFile {

	private String name;
	private String description;
	private String key;
	private String mimeType;
	private Uri uri;
	private String account;
	private long size;
	private boolean isDirectory;

	public GCloudFile() {
	}

	public GCloudFile(String name, String description, String key, Uri uri,
			String account, String mimeType, long size) {
		super();
		this.name = name;
		this.description = description;
		this.key = key;
		this.uri = uri;
		this.account = account;
		this.mimeType = mimeType;
		this.size = size;
	}

	public GCloudFile(String name, String description, String key, String uri,
			String account, String mimeType, long size) {
		super();
		this.name = name;
		this.description = description;
		this.key = key;
		this.uri = Uri.parse(uri);
		this.account = account;
		this.mimeType = mimeType;
		this.size = size;
	}
	
	

	public GCloudFile(String name, String description, String key,
			String mimeType, String uri, String account, long size,
			boolean isDirectory) {
		super();
		this.name = name;
		this.description = description;
		this.key = key;
		this.mimeType = mimeType;
		this.uri = Uri.parse(uri);
		this.account = account;
		this.size = size;
		this.isDirectory = isDirectory;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Uri getUri() {
		return uri;
	}

	public void setUri(Uri uri) {
		this.uri = uri;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getMimeType() {
		return mimeType;
	}

	public void setMimeType(String mimeType) {
		this.mimeType = mimeType;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}	

	public boolean isDirectory() {
		return isDirectory;
	}

	public void setDirectory(boolean isDirectory) {
		this.isDirectory = isDirectory;
	}

	public String toString() {
		return MessageFormat
				.format("File Name: {0}\n + Description: {1} \n + Key: {2} \n + Uri: {3} + \n Account {4}",
						name, description, key, uri.toString(), account);
	}

}
